﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CnGine.CodeGenerator.Models
{
    public class Table
    {
        private int _id = 0;
        private string _name = "";
        private string _tablename = "";
        private string _description = "";
        private bool _isview = false;

        private List<Models.Column> _columns = new List<Column>();

        /// <summary>
        /// 表ID
        /// </summary>
        public int ID
        {
            set { this._id = value; }
            get { return this._id; }
        }
        /// <summary>
        /// 表名称
        /// </summary>
        public string Name
        {
            set { this._name = value; }
            get { return this._name; }
        }
        /// <summary>
        /// 数据库表明称
        /// </summary>
        public string TableName
        {
            set { this._tablename = value; }
            get { return this._tablename; }
        }
        /// <summary>
        /// 表描述信息
        /// </summary>
        public string Description
        {
            set { this._description = value; }
            get { return this._description; }
        }
        /// <summary>
        /// 是否是视图
        /// </summary>
        public bool IsView
        {
            set { this._isview = value; }
            get { return this._isview; }
        }

        /// <summary>
        /// 表的所有列泛型集合
        /// </summary>
        public List<Models.Column> Columns
        {
            set { this._columns = value; }
            get { return this._columns; }
        }
    }
}
